<template>
	<view class="content mainpadding">
		<view class="flexcenter" v-if="!list.data.length">
			<view class="placeholderimage" style="margin-top: 100rpx;" ></view>
		</view>
		<view class="mainpadding ffffff border2 margin_bottom3" v-for="item in list.data" :key="item.id">
			<view class="flexbetween padding_bottom border_bottom_dotted">
				<view class="color_san text_w">
					{{secondDate(item.createtime,1)}}
				</view>
				<view class="text_w">
					<text style="color: #FD463E;" v-if="item.status==0">待處理</text>
					<text style="color: #50B674;" v-if="item.status==1">已處理</text>
					<text style="color: #FD463E;" v-if="item.status==2">待改進</text>
				</view>
			</view>
			<view class="margin_top color_san text_a">
				{{item.content}}
			</view>
			<view class="flexleft flex_wrap padding_bottom border_bottom_solid">
				<view class="imgBox margin_right3 margin_top" v-for="(value,i) in item.images_arr" :key="i" @click="lbtpriview(i,item.images_arr)">
					<image :src="value" mode=""></image>
				</view>
			</view>
			<view class="margin_top color_san text_c" v-if="item.gocontent">
				<u-parse :content="item.gocontent"></u-parse>
			</view>
		</view>
		<view class="flexcenter margin_top" v-if="!list.data.length">
			<image src="/static/placeholderimg.png" mode=""></image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				page: 1,
				limit: 10,
				list: {
					data: []
				}
			}
		},
		onLoad() {
			this.getList()
		},
		methods: {
			async getList(isPage, page) {
				let _this = this
				let res = await this.http.request('/api/member/listBack', 'POST', {
					// page: page || 1,
					// limit: _this.limit,
				})
				if (res.code == 1) {
					let arr=[]
					res.data.forEach(item => {
						item.images=item.images.split(",")
						item.images.forEach(value => {
							value = this.imgUrl + value
							arr.push(value)
						})
						this.$set(item,"images_arr",arr)
					})
					this.list.data = res.data
					console.log(this.list.data)
				}
			},
			// onReachBottom() {
			// 	let _this = this;
			// 	let list = _this.list;
			// 	let page = _this.page;
			// 	if (list.last_page <= page) {
			// 		return false;
			// 	}
			// 	page++;
			// 	_this.page = page;
			// 	_this.getList(true, page);
			// },
		}
	}
</script>

<style lang="scss" scoped>
	.border_bottom_dotted {
		border-bottom: 5rpx dotted rgba(153, 153, 153, 1);
	}

	.imgBox {
		width: 124rpx;
		height: 124rpx;
		border-radius: 16rpx;
		overflow: hidden;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.border_bottom_solid {
		border-bottom: 1rpx solid rgba(153, 153, 153, .1);
	}
</style>